#pragma once
#include<map>
#include<string>
#include "Singleton.h"
using namespace utility;
using namespace std;

namespace reflect {

class object {
public:
	object(){}
	virtual ~object(){}
	virtual void show() = 0;
};
typedef object* (*create_object)(void);

class classFactory {
public:
	friend class Singleton<classFactory>;
	void register_class(const string& className, create_object method);
	object* create_class(const string& className);

private:
	classFactory() {}
	~classFactory() {}
	map<string, create_object> m_classMap;

};


}